import {take,call,put,fork} from 'redux-saga/effects';
import getGoodsCommodityArrt from '../servers/serGoodsCommodityArrt';
function *sagwatchGoodsCommodityArrt() {
    while(true){
        let action=yield take('COMMODITYARRT');
        let payload=yield call(getGoodsCommodityArrt,action.data);
        if (payload.code===200){
            let tempayload=payload.data;
            for(let i in tempayload){
                for(let j in tempayload[i].values){
                    tempayload[i].values[j].checked=false;
                }
            }
            yield put({type:'commodityarrt',data:{aArrt:tempayload}})
        }
    }
}
export default [
    fork(sagwatchGoodsCommodityArrt)
]